<?php
$arr_campo = $items[0]['#entity']->field_imagens_da_perspectivas['und'];
?>

<div class="camera_wrap camera_magenta_skin" id="camera_wrap_2">    
<?php
$path_tema = path_to_theme();

foreach ($arr_campo as $value):
    $img_url = $value['uri'];
    $strImagem = image_style_url('1140_500', $img_url);
    $strThumb = image_style_url('170_120', $img_url);
    
    $img_full = image_style_url('imagem_original', $img_url);;
?>
    <div data-thumb="<?php print $strThumb;?>" data-src="<?php print $strImagem;?>" data-target="_blank" data-link="<?php print $img_full; ?>">
        <div class="camera_caption fadeFromBottom"><?php print $value["alt"];  ?></div>
    </div>
    
<?php 
endforeach; 
?>
</div>
<link rel='stylesheet' id='camera-css'  href='/sites/all/themes/qgdi/js/camera/css/camera.css' type='text/css' media='all'>   
<script type='text/javascript' src='/sites/all/themes/qgdi/js/camera/scripts/jquery.mobile.customized.min.js'></script>
<script type='text/javascript' src='/sites/all/themes/qgdi/js/camera/scripts/jquery.easing.1.3.js'></script> 
<script type='text/javascript' src='/sites/all/themes/qgdi/js/camera/scripts/camera.js'></script>

<script type="text/javascript" src="/sites/all/themes/qgdi/js/fancybox/source/jquery.fancybox.js?v=2.1.5"></script>
<link rel="stylesheet" type="text/css" href="/sites/all/themes/qgdi/js/fancybox/source/jquery.fancybox.css?v=2.1.5" media="screen" />
    
<script> 
(function($) {
        $('#camera_wrap_2').camera({
            height: '500px',
            loader: 'bar',
            pagination: false,
            thumbnails: true
	});
        
       $(document).ready(function() {
            $(".camera_link").click(function() {
                //var link = $(this).attr("href");
                $.fancybox({
                    'padding'		: 0,
                    'autoScale'		: true,
                    'transitionIn'          : 'none',
                    'transitionOut'         : 'none',
                    'title'			: this.title,
                    'href'			: this.href

                });
                return false;
            });
       });  
})(jQuery);
</script>
    
